
package models.spider.deprecated;

/**
 * 
 * @author laurent@opprecht.info
 */
public class LazyFactory<T> {

    protected T       result = null;
    protected boolean hasRun = false;

    public T get() {
        if (hasRun) {
            return result;
        }
        hasRun = true;

        return result = create();
    }

    protected T create() {
        return null;
    }

}
